package com.ruoyi.fantasy.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fantasy.mapper.TalksMapper;
import com.huanzhidadi.fantasy.bean.domain.FantasyTalk;
import com.ruoyi.fantasy.service.ITalksService;
import com.ruoyi.common.core.text.Convert;

/**
 * fantasynpc语句 服务层实现
 * 
 * @author wanghui
 * @date 2019-07-05
 */
@Service
public class TalksServiceImpl implements ITalksService 
{
	@Autowired
	private TalksMapper talksMapper;

	/**
     * 查询fantasynpc语句信息
     * 
     * @param id fantasynpc语句ID
     * @return fantasynpc语句信息
     */
    @Override
	public FantasyTalk selectTalksById(Integer id)
	{
	    return talksMapper.selectTalksById(id);
	}
	
	/**
     * 查询fantasynpc语句列表
     * 
     * @param talks fantasynpc语句信息
     * @return fantasynpc语句集合
     */
	@Override
	public List<FantasyTalk> selectTalksList(FantasyTalk talks)
	{
	    return talksMapper.selectTalksList(talks);
	}
	
    /**
     * 新增fantasynpc语句
     * 
     * @param talks fantasynpc语句信息
     * @return 结果
     */
	@Override
	public int insertTalks(FantasyTalk talks)
	{
	    return talksMapper.insertTalks(talks);
	}
	
	/**
     * 修改fantasynpc语句
     * 
     * @param talks fantasynpc语句信息
     * @return 结果
     */
	@Override
	public int updateTalks(FantasyTalk talks)
	{
	    return talksMapper.updateTalks(talks);
	}

	/**
     * 删除fantasynpc语句对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteTalksByIds(String ids)
	{
		return talksMapper.deleteTalksByIds(Convert.toStrArray(ids));
	}
	
}
